<?php
session_start();
if (empty($_SESSION['username'])) {
    echo '<script type="text/javascript">window.location.href="../index.php";</script>';
} else {
    $now = time();
    if ($now > $_SESSION['expire']) {
        session_destroy();
        echo '<script type="text/javascript">var r=confirm("Session expire (30 mins)!"); if(r==true){window.location.href="../index.php";}else{window.location.href="index.php";}</script>';
    } else {
        require '../model-db-connection/config.php';
        $config = require '../model-db-connection/qrc_conf.properties.php';
    }
}
?>
<table width="80%">
    <tr>
        <td align="right" style="width:250px">Member ID (หมายเลขประจำตัว):</td>
        <td align="left" style="width:250px"><input type="text" class="form-control" id="member_id"></td>
        <td align="right" style="width:250px">Member Name (ชื่อ-สกุล):</td>
        <td align="left" style="width:250px"><input type="text" class="form-control" id="member_name"></td>
    </tr>
    <tr>
        <td align="right" style="width:250px">Role (ตำแหน่ง):</td>
        <td align="left" style="width:250px">
            <select class="form-control" id="role" name="role">
                <option value=""></option>
                <?php
                $sqlSelectProjectType = "SELECT * FROM QRC_MEMBER_ROLE;";
                $resultSet = mysql_query($sqlSelectProjectType);
                while ($row = mysql_fetch_array($resultSet)) {
                    echo '<option value="' . $row['role_id'] . '">' . $row['role_name'] . '</option>';
                }
                ?>
            </select>
        </td>
        <td align="right" style="width:250px">Skill (ความสามารถ):</td>
        <td align="left" style="width:250px">
            <select title="Basic example" multiple="multiple" name="skill" id="select3_2" size="5">
                <?php
                $sqlSelectProjectType = "SELECT * FROM QRC_TYPE_OF_SERVICE;";
                $resultSet = mysql_query($sqlSelectProjectType);
                while ($row = mysql_fetch_array($resultSet)) {
                    echo '<option value="' . $row['service_id'] . '">' . $row['service_name'] . '</option>';
                }
                ?> 
            </select>

        </td>
    </tr>
    <tr>
        <td align="right" style="width:250px">Team Code (หมายเลขทีมช่าง):</td>
        <td align="left" style="width:250px">
            <select class="form-control" id="team_code_in_member_form" name="team_code_in_member_form">
                <option value=""></option>
                <?php
                $sqlSelectProjectType = "SELECT * FROM QRC_TEAM_BUILDER;";
                $resultSet = mysql_query($sqlSelectProjectType);
                while ($row = mysql_fetch_array($resultSet)) {
                    echo '<option value="' . $row['tCode'] . '">' . $row['tCode'] . '</option>';
                }
                ?>
            </select>
        </td>
        <td align="right" style="width:250px">Team Name (ชื่อทีม):</td>
        <td align="left" style="width:250px"><input type="text" class="form-control" id="t_name_in_search"></td>
    </tr>
</table>

<script type="text/javascript" src="../js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" type="text/css" href="../css/datepicker.css" media="screen" />
<script type="text/javascript">
    $(document).ready(function() {
        $("#select3_2").multiselect({
            selectedList: 1
        });
    });
</script>
